package com.vn.ld.order.service;

import java.util.List;

import com.vn.ld.api.context.OrderSearchContext;
import com.vn.ld.btc.dao.entity.Order;
import com.vn.ld.common.domain.PageObjInfo;

public interface IOrderService {
	
	/**
	 * Place order.
	 *
	 * @param order the order
	 * @return the order
	 */
	public Boolean placeOrder(Order order);
	
	/**
	 * Cancel order.
	 *
	 * @param orderId the order id
	 * @param customerId the customer id
	 * @return the boolean
	 */
	public Boolean cancelOrder(String orderId);
	
	/**
	 * Update order status.
	 *
	 * @param orderId the order id
	 * @param customerId the customer id
	 * @param status the status
	 * @return the boolean
	 */
	public Boolean updateOrderStatus(String orderId, Integer status);
	
	/**
	 * Gets the order by order id.
	 *
	 * @param orderId the order id
	 * @param customerId the customer id
	 * @return the order by order id
	 */
	public Order getOrderByOrderId(String orderId);
	
	/**
	 * Search orders by conditions.
	 *
	 * @param searchContext the search context
	 * @param customerId the customer id
	 * @return the list
	 */
	public List<Order> searchOrders(OrderSearchContext searchContext, PageObjInfo pagingInfo);
}
